#import "BaseTableViewCell.h"
@interface BaseTableViewCell()
@property(nonatomic,strong) UILabel *customDetailLabel;
@end
@implementation BaseTableViewCell
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    if(self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]){
        [self setupUI];
    }
    return self;
}
#pragma mark ————— 初始化页面 —————
- (void)setupUI
{
}
-(void)setCustomDetailText:(NSString *)customDetailText{
    _customDetailText = customDetailText;
    self.customDetailLabel.text = customDetailText;
}
#pragma mark - UIGestureRecognizerDelegate
- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldReceiveTouch:(UITouch *)touch
{
    NSLog(@"%@", NSStringFromClass([touch.view class]));
    if ([NSStringFromClass([touch.view class]) isEqualToString:@"UITableViewCellContentView"]) {
        return NO;
    }
    return  YES;
}
-(UILabel *)customDetailLabel{
    if (!_customDetailLabel) {
        _customDetailLabel = [UILabel new];
        [self addSubview:_customDetailLabel];
        _customDetailLabel.font = SYSTEMFONT(14);
        _customDetailLabel.textColor = KGrayColor;
        _customDetailLabel.textAlignment = UITextAlignmentRight;
        [_customDetailLabel mas_makeConstraints:^(MASConstraintMaker *make) {
            make.right.mas_equalTo(-15);
            make.centerY.mas_equalTo(self);
        }];
    }
    return _customDetailLabel;
}
@end
